import QtQuick 1.0

Rectangle {
    id: _root
    width: parent.width
    height: 30
    color: "#00111111"
    border.color: "#5c5c5c"

    signal clicked

    property alias text: _footerText.text
    property bool loading: false

    property real density: 1.0

    Text {
        id: _footerText
        anchors.centerIn: parent
        text: "More..."
        color: "#dddddd"
        font.pixelSize: 12 * density
    }


    Image {
        width: _footerText.height * 1.5 * density
        height: _footerText.height * 1.5 * density
        anchors.right: _footerText.left
        anchors.rightMargin: 5
        anchors.verticalCenter: parent.verticalCenter
        source: "../images/spinner.png"

        NumberAnimation on rotation {
            from: 0
            to: -360
            duration: 1500
            loops: Animation.Infinite
            running: loading
        }

        visible: loading
    }

    MouseArea {
        anchors.fill: parent
        onClicked: {
            parent.clicked();
        }
    }

}
